package net.jjjshop.common.mapper.lbt;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import net.jjjshop.common.entity.lbt.JybTradeOrderEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 交易订单表 DAO 映射层
 */
@Mapper
public interface JybTradeOrderMapper extends BaseMapper<JybTradeOrderEntity> {


    IPage<JybTradeOrderEntity> selectOrder(Page<JybTradeOrderEntity> pages, @Param("sellerId") Integer sellerId,  @Param("buyId") Integer buyId, @Param("status")Integer status, @Param("classType")Integer classType);

    /**
     * 根据订单号查询订单信息
     * @param orderNo
     * @return
     */
    JybTradeOrderEntity queryOrderInfo(@Param("uid")Integer uid,@Param("orderNo")String orderNo);


    /**
     * 查询需要用户处理订单
     * @return
     */
    List<JybTradeOrderEntity> userHandleOrder(@Param("uid")  Integer uid);
}
